-
-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speed and Loops #22
Speed and Loops #22
Conversation
Audio get desynchronised due to play time scheduling when the play button is clicked
The pitch is altered for now ...
Hey sorry for not getting around to this PR earlier @Willena . Is it possible you have time to fix the conflicts from the latest fix I did for removing webpack stuff? |
Yes of course ! But you will have to wait a bit before having a fix, I do not have a lot of times these days. |
@Willena here is a time-stretch algorithm in javascript that does both: stretching time while keeping pitch constant or changing the pitch while keeping the time constant: https://github.com/Infinity/Kali |
Hi ! Thanks @faroit for the info ! I will try to to implement this when I will make this PR compatible with the recent changes. |
Any progress on this? Super excited to give it a go! If you need some help resolving the conflicts I can take a look, but I'm pretty sure you've got em! Just pinging here out of interest, sorry if thats a bother. Cheers! |
I did not work very hard on this these days, but I'm still experiencing some problems with speed change. I can slow down without any trouble by using https://github.com/Infinity/Kali but speeding up the audio is a bit harder due to the fact that when data are processed the result is shorter than the duration of the original, and there is a blank betwen samples. Something that can be done is generate an audio buffer with the full mix then speed up and then play. But that's not how the current system is meant to work. I can push my current work if you want to try it but it's not complete and may contain some bugs. |
Oh cool! The feature in this PR I'm interested in is the Looping! Any way it can be pulled out and presented as its own PR? Not to seem pushy at all, I understand how much work goes into things like this! |
@Willena @alexander-daniel hey guys, I'm thinking more about loops and wondering if it should be done via the events rather than put in core code? The I might try this out in the examples actually. |
@naomiaro I agree with what you are saying, but I think that if something is needed/required by multiple people it can be interesting to add it in the core code. The looping feature is something that people are interested in. By implementing this directly in the core code, with the apropriate events, it will enable the user to make "a customisable" interface, and the user will just have to use each feature of the project without requiring lot of code. Hope somebody can understand me. |
Yeah, I can see the need for it. I really want to move more towards a plugin system though - I think the core project is getting too large. I'd like to remove things into plugins like recording, exporting, annotations etc. like Wavesurfer.js has going on. Just need to figure out a good way to allow this. I've got an example of a loop button here: I had to directly use the playlist object to make some calls as the playout promises are needed for timing. |
I made a small publish to a patch version for that setTimeout. There's a loop button now next to the 'Trim' button. Both of these buttons are only enabled when a segment of audio is selected. |
I totaly agree with that ! it will allow to add new features with ease. A plugin system is what I have planned to work on after that pull request (that needs some work for now).I think #50 or #24 .are waitting for that sort of improvement (implementation of plugin system or something similar) to be solved. |
Hi, great to see the new improvements over the last few months. Is it possible to combine the loops buttons with the annotations? E.g. click a section and set it looping? |
Any update on this? |
It's been three years this pull request is opened. I will close it until I find some time to sync with the project. But it seams that loops have been implemented according to this message |
As requested by some users ( #15 ), I added the ability to loop a part. Part that can be selected with the select tool.
I also added a way to control the playback speed ( #19 ) but the pitch is modified, and I didn't write the algorithm to correct that.
( I don't have any idea of how to do it... I tried https://github.com/mmckegg/soundbank-pitch-shift and it create a very bad sound )
Have a look at the full waveform-playlist example.
Here is a summary of the new functions:
For the new events have a look at the Readme.